From 9cc5a72ea75060f616aadc19ae8653345af4db56 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Sun, 25 Aug 2013 20:53:40 +0000 Subject: [PATCH] Fix use-after-read that I just introduced in gpx.cc --- gpsbabel/gpx.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index dc2689dab..852504ddd 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -1137,8 +1137,7 @@ gpx_end(const QString& el) // FIXME: this code seems to rely on atoi() parsing 3d and 2d as 3 and 2 // which toInt() doesn't do. //wpt_tmp->fix = (fix_type)(cdatastr.toInt() - 1); - const char *t = CSTR(cdatastr); - wpt_tmp->fix = (fix_type)(atoi(t) - 1); + wpt_tmp->fix = (fix_type)(atoi(CSTR(cdatastr)) - 1); } if (wpt_tmp->fix < fix_2d) { if ((cdatastr.compare("none"), Qt::CaseInsensitive) == 0) { -- 2.30.2